@extends('admin.container')

@section('c-head')
    <script type="text/javascript">

        var PAGE_DATA = {
            REST_API : {
                get_supplyer_list_url : "{{route('admin.provider.index')}}", // 获取供应商列表,搜索
                del_supplyer_multi : "{{route('admin.provider.batch-remove')}}", // 删除多条数据
                addrProvince: "{{route('area.province')}}", //一级地区
                addrCity: "{{route('area.city')}}", //二级地区
                addrCounty: "{{route('area.county')}}", //三级地区

            },
            search_fields : [
                {
                    code: "1",
                    text: "用户名"
                },
                {
                    code: "2",
                    text: "公司全称"
                }
            ],
            search_states : [
                {
                    code: "1",
                    text: "开启"
                },
                {
                    code: "2",
                    text: "关闭"
                }
            ]

        };
    </script>
@stop

@section('c-body')
    <div class="comm-title">
        <span class="title-msg">会员 > 供应商 > 列表</span>
    </div>



    <div class="comm-body">
        <div id="nav-tab-btns" class="am-btn-group" style="margin-top: 22px;">
            <button type="button" class="am-btn am-btn-primary am-btn-sm " id="">
                <span style="width:90px;display:block;">供应商列表</span>
            </button>
            <button type="button" class="am-btn am-btn-default am-btn-sm" id="">
                <span style="width:90px;display:block;">待审核</span>
            </button>
            <input id="active-tab" type="hidden" value="0" />
        </div>

        <div class="supplyList-screen mt20 clearfix">
            <div class="supplyList-screen-main">
                <div class="sl-screen-box">
                    <div class="clearfix">
                        <div style="float:left;">
                            <select id="search_field" style="width: 85px;height: 30px;">
                                <option>用户名</option>
                            </select>
                            <input id="search_val" name="search_val" type="text" style="width: 200px;height: 30px;" />
                        </div>

                        <div style="float:left;">
                            <span class="ml25 lh30 c-gray">申请时间：</span>
                            <input id="time-1" type="text"
                                   readonly="readonly"
                                   class="sel-order-time-1 time" />
                            -
                            <input id="time-2" type="text"
                                   readonly="readonly"
                                   class="sel-order-time-2 time" />
                        </div>

                        <div id="comm-state" style="float:left;">
                            <span class="ml25 lh30 c-gray" style="">状态</span>
                            <select id="search_state" style="width: 200px;height: 30px; ">

                            </select>
                        </div>
                    </div>
                    <div class="mt10" style="float:left;">
                        <span class="ml5 lh30 c-gray">所在地区：</span>
                        <select id="addr_province" class="district">
                            <option value="">请选择</option>
                        </select>
                        <select id="addr_city" class="district" style="display:none;">
                            <option value="">请选择</option>
                        </select>
                        <select id="addr_county" class="district" style="display:none;">
                            <option value="">请选择</option>
                        </select>
                        <button id="search-btn" type="button" class="am-btn am-btn-success am-btn-xs ml10" >搜索</button>
                    </div>
                </div>
            </div>
        </div>

        <div id="comm-tbl-content">

            <div class="tab-body" style="display: block;">

                <!-- 表单列表 -->

                <table class="am-table am-table-striped am-table-hover am-table-centered brand-manage-tbl shopAdmin-list mt20" >
                    <thead>
                    <tr>
                        <th style="width:5%">
                            <span style="visibility:hidden;">1</span>
                        </th>
                        <th>用户名</th>
                        <th>公司全称</th>
                        <th>所在地区</th>
                        <th>申请时间</th>
                        <th>店铺状态</th>
                        <th style="width:15%">操作</th>
                    </tr>
                    </thead>
                    <tbody id="comm-tbl-0">

                    <tr style="visibility:hidden;">
                        <td class="sel-chk">
                            <input type="checkbox" data-id="100">
                        </td>
                        <td style="max-width: 100px">

                        </td>
                        <td style="max-width: 185px">

                        </td>
                        <td style="max-width: 100px">

                        </td>
                        <td style="max-width: 100px">

                        </td>
                        <td style="max-width: 100px">

                        </td>
                        <td style="width:15%">
                            <div class="operate-btns-2 clearfix">
                                <a id="" type="button" class="edit-brand-btn am-btn am-btn-primary am-btn-xs"
                                   href="?edit_url" style="float:left;">

                                </a>
                                <button id="" type="button" class=" am-btn am-btn-default am-btn-xs sel-del-btn"
                                        style="float:left; margin-left: 10px;" href="">

                                </button>
                            </div>
                        </td>
                    </tr>

                    </tbody>
                </table>
                <div class="tool-bar-bottom clearfix">
                    <div class="unit">
                        <input id="sel-all-chk-0"
                               type="checkbox"
                               class="mid sel-all-chk"
                               style="position: relative; top:13px;" />
                    </div>
                    <div class="unit" >
                        <label for="sel-all-chk-0" style="cursor:pointer;font-weight:300;">全选</label>
                    </div>
                    <div class="unit">
                        <button id="del-multi-btn-0"
                                type="button"
                                class="am-btn am-btn-default am-btn-xs ml10 del-multi-btn"
                                style="position: relative;float:left;top:5px;">删除</button>
                    </div>
                </div>

                <div id="comm-paging-0" class="admin-paging"></div>
            </div>
            <div class="tab-body" style="display: none">

                <!-- 表单列表 -->

                <table class="am-table am-table-striped am-table-hover am-table-centered brand-manage-tbl shopAdmin-list mt20" >
                    <thead>
                    <tr>
                        <th style="width:5%">
                            <span style="visibility:hidden;">1</span>
                        </th>
                        <th>用户名</th>
                        <th>公司全称</th>
                        <th>所在地区</th>
                        <th>申请时间</th>
                        <th>店铺状态</th>
                        <th style="width:15%">操作</th>
                    </tr>
                    </thead>
                    <tbody id="comm-tbl-1">

                    </tbody>
                </table>
                <div class="tool-bar-bottom clearfix">
                    <div class="unit">
                        <input id="sel-all-chk-1"
                               type="checkbox"
                               class="mid sel-all-chk"
                               style="position: relative; top:13px;" />
                    </div>
                    <div class="unit" >
                        <label for="sel-all-chk-1" style="cursor:pointer;font-weight:300;">全选</label>
                    </div>
                    <div class="unit">
                        <button id="del-multi-btn-1" type="button"
                                class="am-btn am-btn-default am-btn-xs ml10 del-multi-btn"
                                style="position: relative;float:left;top:5px;">删除</button>
                    </div>
                </div>

                <div id="comm-paging-1" class="admin-paging"></div>
            </div>

        </div>
    </div>
    <script type="text/template" id="supplyer-list-templ-0">
        <% _.each(obj, function(item){ %>
        <tr>
            <td class="sel-chk">
                <input type="checkbox" data-id="<%=item.id %>" />
            </td>
            <td style="width:100px; max-width: 100px" title="<%=item.name %>">
                <%=item.name %>
            </td>
            <td style="width:185px; max-width: 185px" title="<%=item.company %>">
                <%=item.company %>
            </td>
            <td style="width:100px; max-width: 100px">
                <%=item.district %>
            </td>
            <td style="width:100px; max-width: 100px">
                <%=item.time %>
            </td>
            <td style="width:100px; max-width: 100px">
                <%=item.state %>
            </td>
            <td style="width:15%">
                <div class="operate-btns-2 clearfix">
                    <a id="" type="button" class="edit-brand-btn am-btn am-btn-primary am-btn-xs"
                       href="<%=item.edit_url %>" style="float:left;">
                        编辑
                    </a>
                    <button id="" type="button"
                            class=" am-btn am-btn-default am-btn-xs sel-del-btn"
                            style="float:left; margin-left: 10px;" href="<%=item.del_url %>">
                        删除
                    </button>
                </div>
            </td>
        </tr>
        <% }); %>
    </script>


    <script type="text/template" id="supplyer-list-templ-1">
        <% _.each(obj, function(item){ %>
        <tr>
            <td class="sel-chk">
                <input type="checkbox" data-id="<%=item.id %>" />
            </td>
            <td style="width:100px; max-width: 100px">
                <%=item.name %>
            </td>
            <td style="width:185px; max-width: 185px">
                <%=item.company %>
            </td>
            <td style="width:100px;max-width: 100px">
                <%=item.district %>
            </td>
            <td style="width:100px;max-width: 100px">
                <%=item.time %>
            </td>
            <td style="width:100px;max-width: 100px">
                <%=item.state %>
            </td>
            <td style="width:15%">
                <div class="operate-btns-2 clearfix">
                    <a id="" type="button" class="edit-brand-btn am-btn am-btn-primary am-btn-xs"
                       href="<%=item.examine_url %>" style="float:left;">
                        审查
                    </a>
                    <button id="" type="button"
                            class=" am-btn am-btn-default am-btn-xs sel-del-btn"
                            style="float:left; margin-left: 10px;" href="<%=item.del_url %>">
                        删除
                    </button>
                </div>
            </td>
        </tr>
        <% }); %>
    </script>
    <script src="/assets/b2b/admin/js/pages/09.10.js"></script>

@stop